<template>
  <div class="btn-container">
    <mt-button type="default" v-if="!isLogin" @click="handleRegister">注册</mt-button>
    <mt-button type="danger" @click.native="handleApply">营采通申请</mt-button>
  </div>
</template>
<script>
import { userIsLogin } from '@/utils/userHandler.js'
export default {
  name: "common-btn",
  data() {
    return {
      isLogin: userIsLogin()
    };
  },
  methods: {
    handleRegister() {
      this.$router.push({path: '/addSupplyChain'})
    },
    handleApply() {
        this.$router.push({name: 'yingcaitong_apply'})
    }
  }
};
</script>
<style lang="scss" scoped>
.btn-container {
  background: #ffffff;
  border-top: 1px solid #eeeeee; /* no */
  width: 100%;
  height: 120px;
  border-top: 1px solid #eee; /* no */
  display: flex;
  justify-content: center;
  box-shadow: 0 2px 5px 0 rgba(0,0,0,0.11);
  button {
    width: 220px;
    height: 80px;
    margin: 21px 20px 12px 30px;
    border-radius: 10px; /* no */
    font-size: 28px;
    &:first-child {
      border: 1px solid #F34B50; /* no */
      background-color: #fff;
      color: #F34B50;
      font-size: 24px;
    }
    &:last-child {
      background-color: #f34b50;
      color: #fff;
      font-size: 24px;
    }
  }
}
</style>
